<?php

namespace IDock\Insurance\JDAL\Request;

use IDock\Insurance\JDAL\Bean\BasePremiumInquiry;
use IDock\Insurance\JDAL\Response\NonCarProductListResponse;
use IDock\Visitor\NonCar\NonCarProductListVisitor;

class NonCarProductListRequest extends AllJDALRequest
{
    public $route = 'quote/queryNoCarPlan';

    public $requestCode = 'nonCarPlanRequest';

    protected $response = NonCarProductListResponse::class;

    protected $urlTip = '非车列表';

    /*** @var  NonCarProductListVisitor $visitor */
    protected $visitor;

    /*** @var BasePremiumInquiry $basePremiumInquiry */
    public $basePremiumInquiry;

    public function generate(): array
    {
        $this->partnerRef = $this->basePremiumInquiry->partnerRef;

        $data = [
            'partnerRef' => $this->visitor->argc['channelCode'] ?? '',
            'branchCode' => $this->visitor->argc['comCode'] ?? '',
            'motorUsageTypeCode' => $this->basePremiumInquiry->motorUsageTypeCode,
            'productLine' => $this->basePremiumInquiry->productLine,
            'productType' => $this->basePremiumInquiry->productType,
            'commVehSubtype' => $this->basePremiumInquiry->commVehSubtype,
            'motorTypeCode' => $this->basePremiumInquiry->motorTypeCode,
            'bodyType' => '东风标致DC7165LSEM轿车', //todo
        ];

        return $data;
    }
}
